import { ref } from 'vue'
import PageContent from '@/components/PageContent'

export function usePageSearch(): any {
  const pageContentRef = ref<InstanceType<typeof PageContent>>()
  const handleQueryClick = (queryData: any = {}) => {
    pageContentRef.value?.getPageData(queryData.value)
  }

  const handleResetClick = () => {
    pageContentRef.value?.getPageData()
  }

  return [pageContentRef, handleQueryClick, handleResetClick]
}
